/** @jsxImportSource @emotion/react */
import * as React from "react";
import {OriginalViewProps} from "../../common/base";
import {config设备概况, EntranceSetup, Projects记录, tail宏观, } from "./orcBase";
import {createItem,} from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {DeviceSurvey} from "../../elevator/editor";
import {AppendixPage, } from "./AppendixPage";
import {ConclusionStation} from "./Conclusion";
import {ProjectR} from "../../gas/utilityNj/ProjectR";
import {config附件仪, SafetyAccesorRes} from "./SafetyAccesor";
import {DeviceSurveyPrf} from "../../boiler/editorDJ";
import {Macroscopic} from "./Macroscopic";
import {AutoUltrasonicRes, config超声波} from "./AutoUltrasonic";
import {config水压试, HydraulicTestRes} from "./HydraulicTest";
import {config外水压试, ExterHydraulicRes} from "./ExterHydraulic";
import {config料审查, MaterialReviewRes} from "./MaterialReview";


const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  createItem('ProjectList', <ProjectR nrec config={Projects记录} label={'记录目录页'}/>),
  createItem('Survey', <DeviceSurvey config={config设备概况} label={'检验结论报告-设备概况'}/>),
  createItem('Conclusion', <ConclusionStation label={'检验结论报告-下结论'}/>),
  createItem('AppendixPage', <AppendixPage label={'检验结果评定汇总'} />),

  createItem('MaterialReview', <DeviceSurveyPrf config={config料审查} label={'资料审查报告(上)'}/>),
  createItem('MaterialReviewRes', <MaterialReviewRes label={'资料审查报告(下)'}/>),

  createItem('Macroscopic', <Macroscopic label={'宏观检验报告'} children={tail宏观}/>),
  createItem('AutoUltrasonic', <DeviceSurveyPrf config={config超声波} title='' label={'全自动超声波检测报告(上)'}/>),
  createItem('AutoUltrasonicRes', <AutoUltrasonicRes label={'全自动超声波检测报告(下)'}/>),
  createItem('SafetyAccesor', <DeviceSurveyPrf config={config附件仪} title='安全阀,压力表' label={'安全附件检验及仪表检验报告（上）'}/>),
  createItem('SafetyAccesorRes', <SafetyAccesorRes  label={'安全附件检验及仪表检验报告（下）'}/>),
  createItem('HydraulicTest', <DeviceSurveyPrf config={config水压试} title='' label={'水压试验报告(上)'}/>),
  createItem('HydraulicTestRes', <HydraulicTestRes  label={'水压试验报告（下）'}/>),
  createItem('ExterHydraulic', <DeviceSurveyPrf config={config外水压试} title='' label={'外测法水压试验报告(上)'}/>),
  createItem('ExterHydraulicRes', <ExterHydraulicRes  label={'外测法水压试验报告（下）'}/>),
  createItem('_Controller',  <></>),
];


export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
